﻿using UnityEngine;
using System.Collections;

public class DestroirMoeda : MonoBehaviour
{
	
	// Use this for initialization
	void Start () 
	{
		
	}
	
	// Update is called once per frame
	void Update ()
	{
		
		
	}
	
	void OnTriggerEnter2D(Collider2D coll)
	{
		if(coll.gameObject.tag == "Player")
		{    
			// chama o AddXp do statusPlayer.
			statusPlayer.instance.AddXp(100);
			//destroi o obj
			Destroy(this.gameObject);

		}
	}
}